package com.disgnpattern.learn.chapter9.before;

import lombok.Data;

/**
 * @author dxy
 * @version 1.0
 * @date 2021/10/24 9:22
 * @decripton 简历
 * @mail victorydeng@163.com
 */
@Data
public class Resume implements Cloneable {
    private String name;
    private String sex;

    @Override
    public Resume clone() throws CloneNotSupportedException {
        return (Resume)super.clone();
    }

    private String age;
    private String timeArea;
    private String company;

    public Resume(String name) {
        this.name = name;
    }

    //设置个人信息
    public void setPersonalInfo(String age, String sex) {
        this.sex = sex;
        this.age = age;
    }

    //设置工作经历
    public void setWorkExperience(String timeArea, String company) {
        this.timeArea = timeArea;
        this.company = company;
    }

    public void display() {
        System.out.println(String.format("个人基础信息：%s,%s,%s", name, sex, age));
        System.out.println(String.format("工作经历：%s,%s", timeArea, company));
    }
}
